package com.wuchao.springs.aoppromax;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Service;

/**
 * @Author wuchao66
 * @Date 2023/10/16 10:06
 * @PackageName:com.wuchao.springs.aoppromax
 * @ClassName: TheAspects
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
@Aspect
@Service
public class TheAspects {//原理还是一样 切面

   // @Before("execution( * com.wuchao.springs.aoppromax.Point.*())")
    @Before("show169()")
    public void before(){
        System.out.println("我是前置增强169");
    }
    @Pointcut("execution( * com.wuchao.springs.aoppromax.Point.*())")
    public void show169(){//挂影子进来

    }
   // @AfterReturning("execution( * com.wuchao.springs.aoppromax.Point.*())")
    @AfterReturning("show169()")
    public void afterReturning(){
        System.out.println("我是后置增强169");
    }
}
